﻿<sdk:Page xmlns:Control="clr-namespace:Galnote.Control"  
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:Extensions="clr-namespace:Sakura.Silverlight.Extensions;assembly=SLExtension" x:Class="Galnote.PreviewList.PreviewDisplay"
           mc:Ignorable="d"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="PreviewDisplay Page">

	<navigation:Page.Resources>
		<ItemsPanelTemplate x:Key="IPT3x7">
			<Extensions:UniformGrid Rows="3" Columns="7"/>
		</ItemsPanelTemplate>
		<ItemsPanelTemplate x:Key="IPT3x5">
			<Extensions:UniformGrid Rows="3" Columns="5"/>
		</ItemsPanelTemplate>
	</navigation:Page.Resources>
	<!--Perview || List || Personal-->
	<Grid x:Name="LayoutRoot">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="0*"/>
			<ColumnDefinition Width="0.15*"/>
			<ColumnDefinition Width="1*"/>
			<ColumnDefinition Width="0*"/>
		</Grid.ColumnDefinitions>
		<!--Tag List Start-->
		<Grid Grid.Column="1"  Margin="0,0,0,35">
			<Grid.RowDefinitions>
				<RowDefinition Height="0.05*"/>
				<RowDefinition Height="1*"/>
			</Grid.RowDefinitions>
			<!--Tag List-->
			<Line Grid.Row="1" X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Right"/>
			<Line Grid.Row="1" X1="4000" X2="0" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Top"/>
			<Line Grid.Row="1" X1="4000" X2="0" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Bottom"/>
		</Grid>
		<!--Preview List Page Start-->
		<Grid x:Name="GridList" Grid.Column="2" Margin="12,0">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="1*"/>
				<RowDefinition Height="0.15*"/>
			</Grid.RowDefinitions>
			<StackPanel Orientation="Horizontal">
				<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" Width="75" Height="36" Margin="10,0">
					<Grid>
						<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2" Width="75"/>
						<TextBlock Text="最新正序" HorizontalAlignment="Center" VerticalAlignment="Center"/>
					</Grid>
				</Button>
				<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" Width="75" Height="36" Margin="10,0">
					<Grid>
						<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2" Width="75"/>
						<TextBlock Text="时间逆序" HorizontalAlignment="Center" VerticalAlignment="Center"/>
					</Grid>
				</Button>
				<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" Width="75" Height="36" Margin="10,0">
					<Grid>
						<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2" Width="75"/>
						<TextBlock Text="随机排列" HorizontalAlignment="Center" VerticalAlignment="Center"/>
					</Grid>
				</Button>
			</StackPanel>
			<!--临时的预览数据，用户空间动画未制作-->
			<ListBox Grid.Row="1" x:Name="PreviewImageList" Style="{StaticResource ResourceKey=GenericLBStyle}" ItemsPanel="{StaticResource IPT3x7}" Loaded="PreviewImageList_Loaded">
				<ListBox.ItemContainerStyle>
					<Style TargetType="ListBoxItem">
						<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
						<Setter Property="VerticalContentAlignment" Value="Stretch"/>
						<Setter Property="Margin" Value="5"/>
						<Setter Property="Template" Value="{StaticResource ResourceKey=GenericLBITemplate}"/>
					</Style>
				</ListBox.ItemContainerStyle>
				<ListBox.ItemTemplate>
					<DataTemplate>
						<Control:PreviewRatio PreviewRatioClick="PreviewRatio_PreviewRatioClick_1"/>
					</DataTemplate>
				</ListBox.ItemTemplate>
			</ListBox>
			<!--翻页动画未制作-->
			<sdk:DataPager x:Name="PreviewImageListDP" Grid.Row="2" HorizontalAlignment="Right" Height="26" PageSize="21" VerticalAlignment="Center" Width="200"/>
		</Grid>
		<!--Download Page Start-->
		<Grid x:Name="GridDownload">
			<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Right"/>
			<Grid>

				<sdk:TabControl Style="{StaticResource ResourceKey=SwitchTopLeftStyle}" TabStripPlacement="Top">
					<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="预览">

						<Grid Margin="5">
							<Grid.RowDefinitions>
								<RowDefinition Height="0.08*"/>
								<RowDefinition Height="1*"/>
								<RowDefinition Height="0.15*"/>
								<RowDefinition Height="0.15*"/>
							</Grid.RowDefinitions>
							<!--Tittle-->
							<TextBlock Style="{StaticResource ResourceKey=GenericTitleStyle}" Text="标题：这么可爱的一定是男孩子" Margin="10,0,0,0"/>
							<!--Image For Download-->
							<Border Grid.Row="1">
								<Image Source="/Images/00003.jpg" Stretch="Uniform"/>
							</Border>
							<!--发布人与时间-->
							<Grid Grid.Row="3">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="50"/>
									<ColumnDefinition/>
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition/>
									<RowDefinition/>
								</Grid.RowDefinitions>
								<Button x:Name="AboutMeAvatarButton" Grid.RowSpan="2" Style="{StaticResource ResourceKey=GenericBtnStyle}" Cursor="Hand" Click="AboutMeAvatarButton_Click">
									<Image Style="{StaticResource ResourceKey=GenericAvatarStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" Width="42" Height="42" Source="/Images/Avatar.jpg" Margin="5,8,0,0"/>
								</Button>
								<Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="8,0,0,0">
									<StackPanel Orientation="Horizontal">
										<TextBlock Style="{StaticResource ResourceKey=GenericTitleStyle}" FontSize="11" Text="By"/>
										<Button x:Name="AboutMeTextButton" Style="{StaticResource ResourceKey=GenericBtnStyle}" Cursor="Hand" Click="AboutMeTextButton_Click">
											<TextBlock Style="{StaticResource ResourceKey=HeaderUserIDStyle}" FontWeight="Bold" Text="存在" Margin="3,0,0,0" />
										</Button>
									</StackPanel>
								</Border>
								<Border Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="8,8,0,0">
									<StackPanel Orientation="Horizontal">
										<Image Source="/Images/Timedata.jpg" Width="15" Height="15" />
										<TextBlock Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" FontWeight="Bold" Text="3 days 2 Hours 15Mins" DataContext="{Binding SelectedItem, ElementName=RevisionContentIMGLB}"/>
									</StackPanel>
								</Border>
							</Grid>
						</Grid>
					</sdk:TabItem>
					<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="留言">
						<Grid/>
					</sdk:TabItem>
				</sdk:TabControl>
				<Button x:Name="DownloadToPreviewButton" Style="{StaticResource ResourceKey=GenericBtnStyle}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="25" Height="25" Margin="10,0,5,0" Click="DownloadToPreviewButton_Click">
					<Image Stretch="Uniform" Source="/Galnote;component/Resources/Icons/close.png"/>
				</Button>
			</Grid>
		</Grid>
		<Grid Grid.Column="3" Margin="8,0,12,0">
			<Grid.RowDefinitions>
				<RowDefinition Height="0.4*"/>
				<RowDefinition Height="1*"/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="1*"/>
				<ColumnDefinition Width="0.3*"/>
			</Grid.ColumnDefinitions>
			<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2"/>
			<Border Padding="2">
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="0.26*"/>
						<RowDefinition Height="1*"/>
						<RowDefinition Height="0.26*"/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="0.25*"/>
						<ColumnDefinition Width="1*"/>
					</Grid.ColumnDefinitions>
					<Grid Grid.ColumnSpan="2">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="0.8*"/>
							<ColumnDefinition Width="1*"/>
						</Grid.ColumnDefinitions>
						<StackPanel Orientation="Horizontal" Margin="12,0" VerticalAlignment="Center">
							<TextBlock Style="{StaticResource ResourceKey=GenericTitleStyle}" FontSize="15" Text="ID:"/>
							<TextBlock Style="{StaticResource ResourceKey=GenericTitleStyle}" FontSize="15" Text="存在"/>
						</StackPanel>
						<Line Grid.Column="2" X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="5,2" VerticalAlignment="Bottom" Margin="50,0,0,3"/>
						<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
							<TextBlock Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="心情： "/>
							<TextBlock Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="焼肉！焼肉！！　食べたい！！"/>
						</StackPanel>
					</Grid>
					<!--Avatar-->
					<Button Grid.Row="1" Style="{StaticResource ResourceKey=GenericBtnStyle}">
						<Extensions:RatioBox Ratio="1">
							<Image Style="{StaticResource ResourceKey=GenericAvatarStyle}" Stretch="Uniform" Source="/Images/Avatar.jpg"/>
						</Extensions:RatioBox>
					</Button>
					<Grid x:Name="PersonalInfo" Grid.Row="1" Grid.Column="1" Margin="15,10,0,0" >
						<Grid.RowDefinitions>
							<RowDefinition Height="1*"/>
							<RowDefinition Height="1*"/>
							<RowDefinition Height="1*"/>
							<RowDefinition Height="1*"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="0.22*"/>
							<ColumnDefinition Width="0.2*"/>
							<ColumnDefinition Width="0.3*"/>
							<ColumnDefinition Width="0.33*"/>
							<ColumnDefinition Width="0.1*"/>
							<ColumnDefinition Width="0.25*"/>
							<ColumnDefinition Width="0.42*"/>
							<ColumnDefinition Width="0.38*"/>
							<ColumnDefinition Width="0.3*"/>
						</Grid.ColumnDefinitions>
						<TextBlock Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="年龄："/>
						<TextBlock Grid.Row="1" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="性别："/>
						<TextBlock Grid.Row="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="血型："/>
						<TextBlock Grid.Row="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="所在地："/>
						<TextBlock Grid.Column="1" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="24"/>
						<TextBlock Grid.Column="1" Grid.Row="1" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="保密"/>
						<TextBlock Grid.Column="1" Grid.Row="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="保密"/>
						<TextBlock Grid.Column="1" Grid.Row="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="上海"/>
						<TextBlock Grid.Column="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="上传量："/>
						<TextBlock Grid.Column="2" Grid.Row="1" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="出生年月："/>
						<TextBlock Grid.Column="2" Grid.Row="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="星座："/>
						<TextBlock Grid.Column="2" Grid.Row="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="在线时间："/>
						<StackPanel  Grid.Column="3" Grid.RowSpan="4">
							<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="5,2" HorizontalAlignment="Right"/>
						</StackPanel>
						<TextBlock Grid.Column="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="231"/>
						<TextBlock Grid.Column="3" Grid.Row="1" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="03/20/88"/>
						<TextBlock Grid.Column="3" Grid.Row="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="双鱼"/>
						<TextBlock Grid.Column="3" Grid.Row="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="20小时"/>
						<TextBlock Grid.Column="5" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="系统："/>
						<TextBlock Grid.Column="5" Grid.Row="1" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="常用软件："/>
						<TextBlock Grid.Column="5" Grid.Row="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="画板："/>
						<TextBlock Grid.Column="6" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="Windows 7"/>
						<TextBlock Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="Phhotoshop 12.0.4，Illustrator10.0.3"/>
						<TextBlock Grid.Column="6" Grid.Row="3" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="CTE-640"/>
						<TextBlock Grid.Column="7" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="作画时听些什么："/>
						<TextBlock Grid.Column="7" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="电波曲，AKB48，JPOP"/>
						<TextBlock Grid.Column="7" Grid.Row="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="桌上环境："/>
						<TextBlock Grid.Column="7" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource ResourceKey=GenericWebContentTextStyle}" Text="吃货一只"/>
					</Grid>
					<StackPanel Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
						<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" Width="75" Margin="0,0,5,5">
							<Grid>
								<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2" Width="75"/>
								<TextBlock Text="加为好友" HorizontalAlignment="Center" VerticalAlignment="Center"/>
							</Grid>
						</Button>
					</StackPanel>
				</Grid>
			</Border>
			<!--Favorites-->
			<sdk:TabControl Grid.Row="1" Style="{StaticResource ResourceKey=SwitchTopLeftStyle}" TabStripPlacement="Top" Margin="0,15,0,0">
				<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="收藏夹" Width="65">
					<Grid Margin="5">
						<ListBox x:Name="ShowcasedList" Grid.Column="1" Style="{StaticResource ResourceKey=GenericLBStyle}" ItemsPanel="{StaticResource IPT3x5}" Loaded="ShowcasedList_Loaded" >
							<ListBox.ItemContainerStyle>
								<Style TargetType="ListBoxItem">
									<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
									<Setter Property="VerticalContentAlignment" Value="Stretch"/>
									<Setter Property="Margin" Value="5"/>
									<Setter Property="Template" Value="{StaticResource ResourceKey=GenericLBITemplate}"/>
								</Style>
							</ListBox.ItemContainerStyle>
							<ListBox.ItemTemplate>
								<DataTemplate>
									<Control:ShowcasedRatio/>
								</DataTemplate>
							</ListBox.ItemTemplate>
						</ListBox>
						<sdk:DataPager x:Name="ShowcasedListDP" HorizontalAlignment="Right" VerticalAlignment="Top" Width="120" Height="26" PageSize="15" Margin="0,-26,0,0"/>
					</Grid>
				</sdk:TabItem>
				<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="最近上传" Width="75">
					<Grid/>
				</sdk:TabItem>
			</sdk:TabControl>
			<!--Avatar Start-->
			<Grid Grid.Column="1" Grid.RowSpan="2" Margin="5">
				<Grid.RowDefinitions>
					<RowDefinition Height="26"/>
					<RowDefinition Height="0.3*"/>
					<RowDefinition Height="0.2*"/>
					<RowDefinition Height="0.5*"/>
				</Grid.RowDefinitions>
				<Line Grid.RowSpan="2" Grid.Row="2" X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Left" Margin="0,20,0,60"/>
				<TextBlock Style="{StaticResource ResourceKey=GenericTitleStyle}" Text="Friend List"/>
				<ListBox x:Name="FriendList" Grid.Row="1" Style="{StaticResource ResourceKey=GenericLBStyle}" Loaded="FriendList_Loaded">
					<ListBox.ItemContainerStyle>
						<Style TargetType="ListBoxItem">
							<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
							<Setter Property="VerticalContentAlignment" Value="Stretch"/>
							<Setter Property="Background" Value="Black"/>
							<Setter Property="Margin" Value="5"/>
							<Setter Property="Template" Value="{StaticResource ResourceKey=GenericLBITemplate}"/>
						</Style>
					</ListBox.ItemContainerStyle>
					<ListBox.ItemsPanel>
						<ItemsPanelTemplate>
							<Extensions:UniformGrid Rows="3" Columns="3"/>
						</ItemsPanelTemplate>
					</ListBox.ItemsPanel>
					<ListBox.ItemTemplate>
						<DataTemplate>
							<Extensions:RatioBox Ratio="1">
								<Control:VisitroAvatar/>
							</Extensions:RatioBox>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>
				<sdk:DataPager x:Name="FriendListDP" Grid.Row="2" PageSize="9" HorizontalAlignment="Right" VerticalAlignment="Top"/>
			</Grid>
			<!--Back To PreviewList Page-->
			<Button x:Name="BackToDownloadButton" Grid.Column="3" Style="{StaticResource ResourceKey=GenericBtnStyle}" VerticalAlignment="Top" HorizontalAlignment="Right" Width="28" Height="28" Margin="0,-5,0,0" Click="BackToDownloadButton_Click">
				<Image Source="/Galnote;component/Resources/Icons/Back.png"/>
			</Button>
		</Grid>
	</Grid>
</sdk:Page>
